<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@include file="../AllLoad.jsp" %>
<div class="bjui-pageHeader">
	<form method="post" id="pagerForm" action="${server}/article" data-toggle="ajaxsearch" >
		<ul class="bjui-searchBar">
			<li>
				<label class="trtitle01">名称：</label>
				<input type="text" size="15" name="article.name" class="form-control" value=""/>
			</li>
			<li>
				<label class="trtitle01">状态：</label>
				<select name="article.status" data-toggle="selectpicker">
	                <option value="">全部</option>
	                <option value="0">未发布</option>
	                <option value="1">已发布</option>
	            </select>
			</li>
			<li>
			 	<button type="submit" class="btn-default" data-icon="search">查询</button>
			</li>
		</ul>
	</form>
</div>
<div class="bjui-pageContent">
    <div class="bjui-headBar">
        <ul>
			<li class="left"><a href="${server}/jsp/article/add.jsp" class="btn btn-default btn-sm" data-icon="save" data-id="article-add_view" data-toggle="navtab" data-title="添加文章" >添加文章</a></li>
			<li class="left"><a href="${server}/article/delete" class="btn btn-default btn-sm" data-icon="trash-o" data-toggle="doajaxchecked" data-type="post" data-confirm-msg="确定要删除选中项吗？" data-idname="ids" data-group="ids">删除文章</a></li>
       </ul>
    </div>
</div>
<div class="pageContent bjui-resizeGrid" style="top: 29px; bottom: 28px;">
	<table data-toggle="tablefixed" data-layout-h="0" data-nowrap="true">
		<thead>
			<tr align="center">
				<th width="35" style="text-align: center;"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"/></th>
				<th width="150">名称</th>
				<!-- <th width="150">内容</th> -->
				<th>状态</th>
				<th width="50">排序</th>
				<th width="100">创建时间</th>
				<th width="150">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.result}" var="article">
				<tr>
					<td  width="35" style="text-align: center;"><input type="checkbox" name="ids" data-toggle="icheck" value="${article.id}" ></td>
					<td>${article.name}</td>
					<%-- <td>${article.content}</td> --%>
					<td>
						<c:if test="${article.status == 0}">未发布</c:if>
						<c:if test="${article.status == 1}">已发布</c:if>
					</td>
					<td>${article.sortx}</td>
					<td><fmt:formatDate value="${article.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
					<td>
						<a href="${server}/article/detail?id=${article.id}" class="btn btn-green" data-id="articleDetail${partner.id}" data-reload-warn="本页已有打开的内容，确定将刷新本页内容，是否继续？" data-icon="edit" data-toggle="navtab" data-title="编辑-${article.name}">编辑</a>&nbsp;
						<a class="btn btn-red" data-toggle="doajax" data-type="post" data-confirm-msg="确定要删除该条数据吗？" href="${server}/article/delete?ids=${article.id}">删除</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<%@include file="../page.jsp" %>